<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<title>New JDBC Resource: General Attributes</title>
<link rel="stylesheet" href="ide.css" title="Oracle BLAFDoc" type="text/css"/>
</head>

<body>
<p><a id="AS_Wiz_DataSource_general" name="AS_Wiz_DataSource_general"></a></p>
<div id="NBCSH4829"><!-- infolevel="all" infotype="General" --><a id="sthref700" name="sthref700"></a>
<h1>New JDBC Resource: General Attributes</h1>
<a name="BEGIN" id="BEGIN"></a>
<p>You see this page of the New File wizard when you are defining a JDBC resource. On this page you choose a connection pool and specify the JNDI name of the resource.</p>
<p>When making a connection to a relational database, the application calls up the JDBC resource using the JNDI resource name. The JDBC resource (datasource) specifies the connection pool used to connect to a database.</p>
<p>Use this page as follows:</p>
<p>To create a JDBC resource, you first need to define a connection pool. Choose one of the following connection pool options:</p>

<table summary="User interface elements and descriptions" dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<col width="24%" />
<col width="*" />
<thead>
<tr align="left" valign="top">
<th align="left" valign="bottom" id="r1c1-t72">Element</th>
<th align="left" valign="bottom" id="r1c2-t72">Description</th>
</tr>
</thead>
<tbody>
<tr align="left" valign="top">
<td align="left" id="r2c1-t72" headers="r1c1-t72">
<p>Use Existing JDBC Connection Pool</p>
</td>
<td align="left" headers="r2c1-t72 r1c2-t72">If selected, select from the drop-down list one of the connection pools already registered with the default server instance. If the connection pool you want does not appear in the list, ensure that it is registered with the default server instance. If no connection pools are listed and you see &lt;No JDBC Connection Pool&gt; in the drop-down list, ensure that the server instance is running.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r3c1-t72" headers="r1c1-t72">
<p>Create New JDBC Connection Pool</p>
</td>
<td align="left" headers="r3c1-t72 r1c2-t72">Select this option to create a new connection pool in the wizard.
<p><b>Note</b>: Alternatively, you can create a JDBC Connection Pool in the New File wizard. Click Back to return to the first screen of the New File wizard and select JDBC Connection Pool in the File Types pane.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r4c1-t72" headers="r1c1-t72">
<p>JNDI name</p>
</td>
<td align="left" headers="r4c1-t72 r1c2-t72">The JNDI name for the resource is required and must be unique to this JDBC resource. The JNDI name of a JDBC resource is expected in the <code dir="ltr">java:comp/env/jdbc</code> subcontext. For example, the JNDI name for the resource of a payroll database could be j<code dir="ltr">ava:comp/env/jdbc/payrolldb</code>. Because all resource JNDI names are in the j<code dir="ltr">ava:comp/env subcontext</code>, when you specify the JNDI name of a JDBC resource enter only <code dir="ltr">jdbc/name</code>. For example, for a payroll database, specify jdbc/payrolldb. When looking up a resource, relative lookups are attempted when other lookup attempts fail. For example, a client can use context.lookup("<code dir="ltr">jdbc/payrolldb</code>") in the place of context.lookup("j<code dir="ltr">ava:comp/env/jdbc/payrolldb</code>") to look up the resource.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r5c1-t72" headers="r1c1-t72">
<p>Object-types</p>
</td>
<td align="left" headers="r5c1-t72 r1c2-t72">The type of the object. You can choose from the following values.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r6c1-t72" headers="r1c1-t72">&nbsp;&nbsp;&nbsp;&nbsp;system-all</td>
<td align="left" headers="r6c1-t72 r1c2-t72">A system resource for all server instances and the domain application server.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r7c1-t72" headers="r1c1-t72">&nbsp;&nbsp;&nbsp;&nbsp;system-admin</td>
<td align="left" headers="r7c1-t72 r1c2-t72">A system resource only for the domain application server.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r8c1-t72" headers="r1c1-t72">&nbsp;&nbsp;&nbsp;&nbsp;system-instance</td>
<td align="left" headers="r8c1-t72 r1c2-t72">A system resource for all server instances only.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r9c1-t72" headers="r1c1-t72">&nbsp;&nbsp;&nbsp;&nbsp;user</td>
<td align="left" headers="r9c1-t72 r1c2-t72">A user resource.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r10c1-t72" headers="r1c1-t72">
<p>Enabled</p>
</td>
<td align="left" headers="r10c1-t72 r1c2-t72">Set to true to enable the resource, or false to disable the resource.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r11c1-t72" headers="r1c1-t72">
<p>Description</p>
</td>
<td align="left" headers="r11c1-t72 r1c2-t72">Description of the resource (optional).</td>
</tr>
</tbody>
</table>
<br />
<!-- -->
<a id="NBCSH4836" name="NBCSH4836"></a>
<hr><p><b>Related Topics</b></p>
<p><i>Developing Applications with NetBeans IDE</i>, 
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG1681">
<param name="text" value="<html><u>&quot;Working with Glassfish Application Servers&quot;</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</p>

<!-- -->
<!-- Start Footer -->


<table summary="" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="left" width="86%"><a href="legal_notice.htm">
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0.</a>
</td>
</tr>
</table>
<!-- -->
</body>
</html>
